#ifndef EJANIMATIONWIDGET_H
#define EJANIMATIONWIDGET_H

#include <QWidget>

#include <QTimer>
#include <memory>
#include "ejanimation.h"

class EJAnimationWidget : public QWidget
{
    Q_OBJECT
public:
    explicit EJAnimationWidget(QWidget *parent = 0);

    void setAni(EJAnimation *ani);

    void paintEvent(QPaintEvent *event = 0);

signals:

public slots:
    void OnTimeOut();
private:

    EJAnimation  *m_ani = nullptr;

    QTimer       *m_timer = nullptr;

    int           m_index = 0;
};

#endif // EJANIMATIONWIDGET_H
